<?php
// 将网站根目录等指向/mobile/index路径
Route::get('/', function (){
    return redirect('/mobile/index');
});
Route::get('/mobile', function (){
    return redirect('/mobile/index');
});
//扫码页面
Route::get('s', function () {
        return view('web.sweep-menu', ['title' => '扫码点餐']);
});
Route::get('hello', function () {
    return "hello world";
});
//确定扫码订单
Route::get('mobile/scan', function () {
    return view('web.scan-order', ['title' => '确认定单']);
});
/*
|--------------------------------------------------------------------------
| 测试路由
|--------------------------------------------------------------------------
*/
Route::get('/lyj', function () {
   return 1+floatval('1000');
});

Route::get('/lyj6', function (App\Tools\CouldPrint $check){
    return  $check->printer(182);
});

/*
|--------------------------------------------------------------------------
| 公用路由
|--------------------------------------------------------------------------
*/

Route::group(['prefix' => 'callback'],function () {
    //易联云接单拒单回调
    Route::post('/yly', 'Web\CallbackController@ylycallback')->middleware('crosshttp');
    Route::get('/yly', 'Web\CallbackController@ylycallback')->middleware('crosshttp');
    //Route::get('/lyj', 'Web\CallbackController@ylygetCache');

});

//图片上传
Route::post('/uploadImg', 'ImgController@upload');
//多图上传
Route::post('/uploadImgs', 'ImgController@uploads');
//网页登录
Auth::routes();
Route::get('/home', 'HomeController@index')->name('home');
//网页注册
Route::post('/sendCode', 'Auth\RegisterController@sendSmsCode');
//退出登录
Route::get('/logout', 'LogoutController@logout');
//网页找回
Route::post('/sendCode2', 'Auth\ForgotPasswordController@sendSmsCode');
Route::post('/mobile/forgot', 'Auth\ForgotPasswordController@findPassword');
//微信授权登录
Route::get('/auth/oauth', 'Auth\AuthController@oauth');
//微信接口回调
Route::get('/auth/callback', 'Auth\AuthController@callback');
//QQ授权登录
Route::get('/qqlogin','Auth\AuthController@qqlogin');
Route::get('/qq','Auth\AuthController@qq');
//token登录
Route::get('/redirect', function (){
    $query = http_build_query([
        'client_id' => '3',
        'redirect_uri' => 'http://localhost/auth/callback',
        'response_type' => 'code',
        'scope' => '',
    ]);
    return redirect('http://localhost/oauth/authorize?' . $query);
});
Route::get('/auth/callback', function (\Illuminate\Http\Request $request){
    if ($request->get('code')) {
        return 'Login Success';
    } else {
        return 'Access Denied';
    }
});
/*
|--------------------------------------------------------------------------
| 网页端路由组
|--------------------------------------------------------------------------
*/
Route::group(['prefix' => 'mobile'],function () {
    /**
     *无需登录
     */
    //平台首页
    Route::get('/index', 'Web\IndexController@getRecommend');
    //错误提示
    Route::get('err', function () {
        return view('err', ['title' => '提示信息']);
    });
    //注册页面
    Route::get('register', function () {
        return view('auth.register', ['title' => '注册']);
    });
    //菜品详情
    Route::get('search', function () {
        return view('web.search', ['title' => '搜索']);
    });
    //菜品详情
    Route::get('shopsDetail', function () {
        return view('web.shops-detail', ['title' => '菜品详情']);
    });
    //菜品详情-邀请函
    Route::get('invitation', function () {
        return view('web.invitation', ['title' => '邀请函']);
    });
    //商家首页
    Route::get('shops/{id}','Web\IndexController@ShopIndex');
    //预定页面
    Route::get('reserve', function () {
        return view('web.reserve', ['title' => '预定']);
    });
    //支付页面
    Route::get('payment','Web\PayController@index');
    Route::get('h5','Web\PayController@h5');
    //外卖页面
    Route::get('takeout', function () {
        return view('web.takeout', ['title' => '外卖']);
    });

    //排队页面
    Route::get('takeout-line', function () {
        return view('web.takeout-line', ['title' => '排队订座']);
    })->middleware('auth');
    //外卖菜单
    Route::get('takeout-menu', function () {
        return view('web.takeout-menu', ['title' => '菜单']);
    });
//    //扫码页面
//    Route::get('sweep-menu', function () {
//        return view('web.sweep-menu', ['title' => '扫码点餐']);
//    });
    //排队页面
    Route::get('lineup', function () {
        return view('web.lineup', ['title' => '排队']);
    });
    //活动页面
    Route::get('activity', function () {
        return view('web.activity', ['title' => '活动']);
    });
    //活动页面详情
    Route::get('activityk', function () {
        return view('web.activityk', ['title' => '活动详情']);
    });
    //特惠专区页面
    Route::get('preferential', function () {
        return view('web.preferential', ['title' => '特惠专区']);
    });
    //推荐专区页面
    Route::get('recommend', function () {
        return view('web.recommend', ['title' => '推荐专区']);
    });
    //关于我们
    Route::get('Aboutus', function () {
        return view('member.Aboutus', ['title' => '关于我们']);
    });
    //联系我们
    Route::get('contact', function () {
        return view('member.contact', ['title' => '隐私和权限']);
    });
    //忘记密码
    Route::get('email', function () {
        return view('auth.passwords.email', ['title' => '修改密码']);
    });
    //城市选择
    Route::get('cities', function () {
        return view('web.cities-select', ['title' => '城市选择']);
    });
    //$this->get('index', 'Web\PersonController@index');
    /**
     *需要登录
     */
    Route::middleware(['auth'])->group(function () {
        Route::get('tongt', function () {
            return view('member.tongt', ['title' => '通通']);
        });

        //个人中心
        Route::get('mine', function () {
            return view('member.mine', ['title' => '我的']);
        });
        //我的信息
        Route::get('voucher', function () {
            return view('member.voucher', ['title' => '个人信息']);
        });
        //确定订单页面
        Route::get('takeout-order', function () {
            return view('web.takeout-order', ['title' => '确认定单']);
        });
        //银行卡
        Route::get('business', function () {
            return view('member.business', ['title' => '添加银行卡']);
        });
        Route::get('businesf', function () {
            return view('member.businesf', ['title' => '管理银行卡']);
        });
        //设置confirm
        Route::get('install', function () {
            return view('member.install', ['title' => '设置']);
        });
        //支付密码
        Route::get('confirm', function () {
            return view('member.confirm', ['title' => '支付密码']);
        });
        //登录密码
        Route::get('password', function () {
            return view('member.password', ['title' => '登录密码']);
        });
        //实名认证
        Route::get('realname', function () {
            return view('member.realname', ['title' => '实名认证']);
        });
        //订单列表页面
        Route::get('order-list', function () {
            return view('web.order-list', ['title' => '订单列表']);
        });
        //订单详情页面
        Route::get('order-detail', function () {
            return view('web.order-detail', ['title' => '订单详情']);
        });
        //全部地址
        Route::get('address', function () {
            return view('member.address', ['title' => '地址']);
        });
        //添加地址
        Route::get('append', function (\Illuminate\Http\Request $request) {
            if($request->id){
                return view('member.append', ['title' => '修改地址']);
            }else{
                return view('member.append', ['title' => '添加新地址']);
            }
        });
        //评论页面
        Route::get('comments', function () {
            return view('web.comments', ['title' => '评论']);
        });
        //钱包页面
        Route::get('remaining', function () {
            return view('member.remaining', ['title' => '钱包']);
        });
        //充值卡prepaid
        Route::get('prepaid', function () {
            return view('member.prepaid', ['title' => '充值卡充值']);
        });
        //充值卡号 refillcard
        Route::get('refillcard', function () {
            return view('member.refillcard', ['title' => '充值卡']);
        });
        //明细
        Route::get('remainin', function () {
            return view('member.remainin', ['title' => '明细']);
        });
        //明细详情
        Route::get('remation', function () {
            return view('member.remation', ['title' => '明细详情']);
        });
        //预定页面
        Route::get('takeout-booking', function () {
            return view('web.takeout-booking', ['title' => '预订']);
        });
        //微信支付
        Route::get('pay.wechatapp', function () {
            return view('pay.wechatapp', ['title' => '微信支付']);
        });
        //我的店铺
        Route::get('shopAdmin/index', function () {
            return view('shopAdmin.index', ['title' => '我的店铺']);
        });
        //新建店铺
        Route::get('shopAdmin/Thenewstore', function () {
            return view('shopAdmin.Thenewstore', ['title' => '新建店铺']);
        });
        /**
         * 商家权限处理
         */
        Route::middleware(['shopcheck'])->group(function () {
            //店铺管理
            Route::get('shopAdmin/store', function () {
                return view('shopAdmin.store', ['title' => '店铺管理']);
            });
            //修改店铺
            Route::get('shopAdmin/editStore', function () {
                return view('shopAdmin.editStore', ['title' => '修改店铺']);
            });
            //添加员工
            Route::get('shopAdmin/agent', function () {
                return view('shopAdmin.agent', ['title' => '添加员工']);
            });
            //员工管理
            Route::get('shopAdmin/System', function () {
                return view('shopAdmin.System', ['title' => '员工管理']);
            });
            //菜单管理
            Route::get('shopAdmin/storeH', function () {
                return view('shopAdmin.storeH', ['title' => '菜单管理']);
            });
            //房桌管理
            Route::get('shopAdmin/table', function () {
                return view('shopAdmin.table', ['title' => '房桌管理']);
            });
            //房桌管理
            Route::get('shopAdmin/table', function () {
                return view('shopAdmin.table', ['title' => '房桌管理']);
            });
            //修改房桌
            Route::get('shopAdmin/rodeletethe', function () {
                return view('shopAdmin.rodeletethe', ['title' => '修改房桌']);
            });
            //改版房桌管理
            Route::get('shopAdmin/tablel', function () {
                return view('shopAdmin.tablel', ['title' => '改版房桌管理']);
            });

            //添加房桌
            Route::get('shopAdmin/rootable', function () {
                return view('shopAdmin.rootable', ['title' => '添加房桌']);
            });
            //设备管理
            Route::get('shopAdmin/manager', function () {
                return view('shopAdmin.manager', ['title' => '设备管理']);
            });
            //添加设备
            Route::get('shopAdmin/pment', function () {
                return view('shopAdmin.pment', ['title' => '添加设备']);
            });
            //设备信息
            Route::get('shopAdmin/facility', function () {
                return view('shopAdmin.facility', ['title' => '设备信息']);
            });
            //查看房桌二维码
            Route::get('shopAdmin/tableCode', function () {
                return view('shopAdmin.table-code', ['title' => '房桌二维码']);
            });
            //订单管理
            Route::get('shopAdmin/manage', function () {
                return view('shopAdmin.manage', ['title' => '订单管理']);
            });
            //服务员加菜页面
            Route::get('shopAdmin/sidedish', function () {
                return view('shopAdmin.sidedish', ['title' => '加菜']);
            });
            //菜单分类
            Route::get('shopAdmin/storeT', function () {
                return view('shopAdmin.storeT', ['title' => '菜品分类']);
            });
            //添加菜单
            Route::get('shopAdmin/storeHC', function () {
                return view('shopAdmin.storeHC', ['title' => '添加菜单']);
            });
            //菜单信息
            Route::get('shopAdmin/storeHCA', function () {
                return view('shopAdmin.storeHCA', ['title' => '修改菜单信息']);
            });

        });
        //订单详情
        Route::get('shopAdmin/enewstore', function () {
            try{

                return view('shopAdmin.enewstore', ['title' => '订单详情']);
            }catch (\Exception $e){
                return redirect()->back();
            }

        });
        //员工详情
        Route::get('shopAdmin/details', function () {
            return view('shopAdmin.details', ['title' => '员工详情']);
        });
        // 通通
        Route::get('tongs', function () {
            return view('service');
        });
        //房桌详情
        Route::get('/room-detail', function () {
            return view('web.room-detail', ['title' => '房桌详情']);
        });
    });

});
/*
|--------------------------------------------------------------------------
| 接口端路由组
|--------------------------------------------------------------------------
*/

Route::group(['prefix' => 'api'],function () {
    //平台首页
    Route::get('/index', 'Web\IndexController@index');
    Route::get('/indexRecommend', 'Web\IndexController@getRecommend');
    Route::get('/shop', 'Web\IndexController@ShopIndex');
    Route::get('/shopinfo', 'Web\IndexController@ShopInfo');
    Route::get('/reserve', 'Web\IndexController@ReserveShopIndex');
    Route::get('/takeout', 'Web\IndexController@TakeShopIndex');
    Route::get('/typeData', 'Web\IndexController@typeData');//外卖的分类
    Route::get('/typeReserveData', 'Web\IndexController@typeReserveData');//预定的分类
    Route::get('/list', 'Web\IndexController@ListShopIndex');
    Route::get('/recommend', 'Web\IndexController@recommend');//为你推荐
    Route::get('/preferential', 'Web\IndexController@preferential');//特惠专区
    Route::get('/preferentialSecond', 'Web\IndexController@preferentialSecond');//特惠专区demo
    Route::post('detailDish','Web\IndexController@detailDish');//菜式详情
    //外卖模块sureForRefund
    Route::get('/getshopMenu', 'Web\TakeoutController@getshopMenu');
    Route::get('/getIdshopdish', 'Web\TakeoutController@getIdshopdish');    // 根据分类ID获取菜式
    Route::get('/getRecommendDishes', 'Web\TakeoutController@getRecommendDishes');    // 根据不同类型获取不同推荐菜式
    Route::post('/TaddOrder', 'Web\TakeoutController@addOrder');
    Route::post('/TapplyForRefund', 'Web\TakeoutController@applyForRefund');
    Route::post('/confirmReceipt', 'Web\TakeoutController@confirmReceipt');
    Route::post('/sureOrder', 'Web\TakeoutController@sureOrder');
    //商家同意退款，兼容外卖预定模块
    Route::post('/sureForRefund', 'Web\TakeoutController@sureForRefund');
    //预定模块
    Route::get('/checkDeskRoom', 'Web\ReserveController@checkDeskRoom');
    Route::post('/RaddOrder', 'Web\ReserveController@addOrder');
    Route::post('/applyForRefund', 'Web\ReserveController@applyForRefund');
    Route::post('/arrivaledShop','Web\ReserveController@arrivaledShop');
    Route::post('/callAttendant', 'Web\ReserveController@callAttendant');
    Route::post('/addDishes', 'Web\ReserveController@addDishes');
    Route::post('/showRoom', 'Web\RoomTableController@showOneRoomTable');
    Route::post('/sureArrivaled', 'Web\ReserveController@sureArrivaled');
    //生成邀请函
    Route::post('/buildinvitation', 'Web\ReserveController@buildInvitation');
    //显示邀请函
    Route::post('/showinvitation', 'Web\ReserveController@showInvitation');
    //扫码模块
    Route::post('/scanDeskRoom', 'Web\ScanController@getOne');//SHU
    Route::post('/SaddOrder', 'Web\ScanController@addOrder');
    Route::post('/ScallAttendant', 'Web\ScanController@callAttendant');//扫码呼叫
    Route::post('/SaddDishes', 'Web\ScanController@addDishes');//扫码加菜（暂不用）
    //排队模块
    Route::post('/QaddOrder', 'Web\QueueController@createQueueOrder');
    //充值模块
    Route::post('/onlineCharge', 'Web\ChargeController@addOrder');     //在线普通充值
    Route::post('/cardCharge', 'Web\ChargeController@cardCharge');      //充值卡充值
    Route::post('/shareCard', 'Web\ChargeController@shareCard');        //在线分享充值
    Route::post('/getShareCards', 'Web\ChargeController@getShareCards');//获取分享卡
    Route::post('/getShareCode', 'Web\ChargeController@getShareCode');//获取分享卡
    //支付模块
    Route::post('/pay', 'Web\PayController@payOrder');
    Route::get('/payh5', 'Web\PayController@h5');
    Route::post('/payh5', 'Web\PayController@payh5');
    Route::post('/wechat_notify', 'Web\PayController@wechat_notify');
    Route::get('/wechat_notify', 'Web\PayController@wechat_notify');
    Route::post('/alipay_notify', 'Web\PayController@alipay_notify');
    Route::get('/alipay_notify', 'Web\PayController@alipay_notify');
    Route::post('/alipay_return', 'Web\PayController@alipay_return');
    Route::get('/alipay_return', 'Web\PayController@alipay_return');
    Route::post('/check_order', function (App\Tools\SqlCheck $check,\Illuminate\Http\Request $request){
        return  $check->checkOrder($request->id);
    });
    Route::post('/check_shop', function (App\Tools\SqlCheck $check,\Illuminate\Http\Request $request){
        return  $check->checkShop($request->shopsId,$request->type);
    });
    //Route::post('/payNotify', 'Web\TakeoutController@payCallback');
    //个人中心
    Route::post('user/userMessage', 'Web\UserController@userMessage');         //用户信息
    Route::post('user/updateMessage', 'Web\UserController@updateUserMessage'); //修改用户资料
    Route::post('user/withdraw', 'Web\UserController@withdraw');               //提现
    Route::post('user/bank', 'Web\UserController@getBank');               //提现
    Route::post('user/account', 'Web\UserController@account');                 //账单明细
    Route::post('user/detailAccount', 'Web\UserController@accountDetail');     //账单详情
    Route::post('user/myOrder', 'Web\UserController@getMyOrder');              //我的订单
    Route::post('user/orderDetail', 'Web\UserController@orderDetail');         //订单详情
    Route::post('user/deleteOrder', 'Web\UserController@deleteUserOrder');      //删除个人订单
    Route::post('user/myShop', 'Web\UserController@myShop');                   //我的商铺
    Route::post('user/allAddress', 'Web\AddressController@getAllAddress');     //我的所有地址
    Route::post('user/detailAddress', 'Web\AddressController@getOneAddress');  //详细地址
    Route::post('user/addAddress', 'Web\AddressController@addAddress');        //添加地址
    Route::post('user/editAddress', 'Web\AddressController@editAddress');      //修改地址
    Route::post('user/defaultAddress', 'Web\AddressController@defaultAddress');//设置默认地址
    Route::post('user/deleteAddress', 'Web\AddressController@deleteAddress');  //删除地址
    Route::post('user/comment','Api\v1\CommentController@comment');            // 用户评论
    Route::post('shop/comments','Web\CommentController@shopComments');       // 获取商家评论
    Route::post('shop/addcomment','Web\CommentController@addComment');       // 添加商家评论
    Route::get('user/comments','Api\v1\CommentController@userComments');       // 获取用户评论
    Route::post('user/identify', 'Web\UserController@identify');//实名认证
    Route::post('user/checkIdentify', 'Web\UserController@checkIdentify');//检查是否实名认证
    Route::post('shop/addCard', 'Web\UserController@addCard');//添加银行卡
    Route::post('shop/deleteCard', 'Web\UserController@deleteCard');//删除银行卡
    Route::post('shop/showCard', 'Web\UserController@showCard');//展示银行卡
    Route::post('user/applyShop', 'Web\UserController@applyShop');//申请成为商家
    Route::post('shop/dish', 'Web\ShopDishController@showDesignDish');//展示某一菜式信息

    //优惠
    Route::post('/coupon', 'Web\couponController@getCoupon');//优惠券

    //总后台
    Route::post('admin/createCard', 'Web\CardController@createCard');     //充值卡
    Route::get('admin/createCard', function () {
        return view('admin.card');
    });

    //密码
    Route::post('user/setpayword', 'Web\UserController@setPayword');          //设置支付密码
    Route::post('user/updatepayword', 'Web\UserController@updatePayword');    //修改支付密码
    Route::post('user/updatepassword', 'Web\UserController@updatePassword');  //修改登录密码

    Route::post('robot/askQuestion', 'Web\RobotController@intelligentAnswer');//智能机器人
    //    -------------------------------商家管理 商铺管理----------------------------------
    Route::post('shop/add', 'Web\ShopController@createShop');//创建商铺
    Route::post('shop/show', 'Web\ShopController@showEditShop');//展示修改商铺的资料
    Route::post('shop/delete', 'Web\ShopController@deleteShop');//删除商铺
    Route::post('shop/edit', 'Web\ShopController@editShop');//修改商铺
    Route::post('shop/upload', 'Web\ShopController@upload');//商铺的图片上传
    Route::post('shop/all', 'Web\ShopController@showAllShops');//修改商铺
    Route::post('shop/open', 'Web\ShopController@shopOpen');// 商家营业与否
    //    -------------------------------商家管理 房桌管理----------------------------------
    Route::post('shop/createRoomTable', 'Web\RoomTableController@createRoomTable');//创建房桌
    Route::post('shop/updateRoomTable', 'Web\RoomTableController@updateRoomTable');//修改房桌
    Route::post('shop/showRoomTable', 'Web\RoomTableController@showRoomTable');//房桌展示
    Route::post('shop/deleteRoomTable', 'Web\RoomTableController@deleteRoomTable');//删除房桌
    //    -------------------------------商家管理 员工管理----------------------------------
    Route::post('clerk/add', 'Web\ShopController@addClerk');//员工信息添加
    Route::post('clerk/one', 'Web\ShopController@showOneClerk');//获取某一具体员工信息
    Route::post('clerk/all', 'Web\ShopController@getAllClerks');//获取所有员工信息
    Route::post('clerk/edit', 'Web\ShopController@editOneClerk');//员工信息编辑
    Route::post('clerk/del', 'Web\ShopController@delOneClerk');//员工信息编辑
    Route::post('shop_dish/search', 'Web\ShopController@searchDish');//菜式搜索
    Route::post('shop/search', 'Web\ShopController@search');//商家搜索
    //    -------------------------------商家管理 设备管理----------------------------------
    Route::post('printer/all', 'Web\PrinterController@getAllPrinter');//查看所有打印机设备
    Route::post('printer/edit', 'Web\PrinterController@editPrinter');//打印机设备编辑
    Route::post('printer/add', 'Web\PrinterController@addPrinter');//打印机设备添加
    Route::post('printer/one', 'Web\PrinterController@showOnePrinter');//某一打印机信息
    Route::post('printer/del', 'Web\PrinterController@deleteOnePrinter');//删除打印机
    //    -------------------------------商家管理 菜单管理----------------------------------
    Route::post('shop_menu/all','Web\ShopMenuController@showAllMenu');//获取所有的菜单信息
    Route::post('shop_menu/one','Web\ShopMenuController@showOneMenu');//获取某一菜单信息
    Route::post('shop_menu/dish','Web\ShopMenuController@showOneMenuDish');//获取某个分类下的所有菜式
    Route::post('shop_menu/add', 'Web\ShopMenuController@addMenu');//添加菜单
    Route::post('shop_menu/edit', 'Web\ShopMenuController@editMenu');//编辑菜单
    Route::post('shop_menu/del', 'Web\ShopMenuController@delMenu');//删除菜单
    Route::post('shop_menu/upload', 'Web\ShopMenuController@upload');//上传菜单图片
    //    -------------------------------商家管理 菜式管理----------------------------------
    Route::post('shop_dish/all','Web\ShopDishController@showAllDishes');//获取所有的菜式信息
    Route::post('shop_dish/alldesign','Web\ShopDishController@showAllDesignDishes');
    Route::post('shop_dish/one','Web\ShopDishController@showOneDish');//获取某一菜式信息
    Route::post('shop_dish/add', 'Web\ShopDishController@addDish');//添加菜式
    Route::post('shop_dish/edit', 'Web\ShopDishController@editDish');//编辑菜式
    Route::post('shop_dish/upload', 'Web\ShopDishController@upload');//上传菜式图片
    Route::post('shop_dish/del', 'Web\ShopDishController@dishDelete');//    菜式删除
    Route::post('shop_dish/status', 'Web\ShopDishController@dishStatus');//    菜式上下架
    //    -------------------------------商圈管理----------------------------------
    Route::get ('city/get','Web\TraceAreaController@showTraceArea');//获取商圈
    Route::post('city/add','Web\TraceAreaController@addTraceAera'); //添加商圈
    Route::post('city/delect','Web\TraceAreaController@delectTraceAera');//删除商圈
    //    -------------------------------商家管理 订单管理----------------------------------
    Route::post('shop/allOrders', 'Web\OrderController@getAllOrders');//所有订单
    Route::post('shop/checkOrder', 'Web\OrderController@checkOneOrders');//所有订单
    Route::post('shop/oneOrder', 'Web\OrderController@getOneOrder');//某一个订单
    // 小程序
    Route::any('/program/login', 'Web\ProgramController@login');    // 登陆
    Route::post('/program/send', 'Web\ProgramController@send');    // 发送短信
    Route::post('/program/check', 'Web\ProgramController@checkUser');    // 发送短信
    Route::post('/program/saveinfo', 'Web\ProgramController@saveInfo');     //保存用户信息
    Route::get('/program/shops', 'Web\IndexController@ShopIndexProgram');   // 商家首页返回数据
    Route::get('/program/indexRecommend', 'Web\IndexController@getProgramRecommend');  // 首页接口
    Route::post('/program/TaddOrder', 'Web\TakeoutController@addProgramOrder');    // 外卖下单
    Route::post('/program/RaddOrder', 'Web\ReserveController@addOrderProgram');     //预定下单
    Route::get('/show', 'Web\ShopDishController@show');     //test 菜单多规格
    Route::get('/program/banner', 'MiniApp\BannerController@index');     //小程序轮播图
    Route::post('/program/cancleNotPayOrder', 'MiniApp\OrderController@cancleNotPayOrder');     //下单未付款的单 删除
    Route::post('/program/addComment', 'MiniApp\CommentController@add');     //小程序添加评论
    Route::post('/program/nextOrder', 'MiniApp\OrderController@nextOrder');     //小程序再来一单

    Route::post('/activities','Web\NewsController@index');  //所有活动
    Route::post('/activity/detail','Web\NewsController@read');  // 活动详情
    Route::get('/search/shop','Web\SearchController@searchShop');  // 商铺搜索

    Route::post('/funds','Web\WalletLogController@index');  //所有明细
    Route::post('/funds/detail','Web\WalletLogController@read');  // 明细详情

//    Route::get('/recommendtest','Web\RecommendController@index');  // 测试
//    Route::post('/build','Web\RecommendController@build');  // 测试
//    Route::post('/testGeo','Web\RecommendController@testGeo');  // 测试
});
/*
|--------------------------------------------------------------------------
| 公众号路由组
|--------------------------------------------------------------------------
*/
Route::any('/wechat', 'Web\WechatController@serve');    // 微信公众号配置
Route::group(['middleware' => ['web', 'wechat.oauth']], function () {
    //Route::get('/api/pay', 'Web\PayController@payOrder');
    Route::group(['prefix'=>'wechat'],function (){

        Route::get('/login', 'Web\WechatController@login');  //微信公众号授权登陆
        Route::post('/send','Web\WechatController@send');  // 发送验证码
        Route::post('/bind','Web\WechatController@checkUser');  // 绑定用户

        Route::get('/check', 'Web\WechatController@checkUser');//微信公众号验证

        Route::get('/menu', 'Web\WechatController@menu');    //微信公众号菜单设置



        Route::get('/templatedemo', 'Web\WechatController@sendTemplate');//微信公众号模板消息发送demo

        Route::get('/userlist', 'Web\WechatController@userlist');//微信公众号用户列表

        Route::get('/exceldemo', 'Web\WechatController@exceldemo');  // excel报表的实例
        Route::get('createCard', 'Web\WechatController@createCard');  // 创建卡券
        Route::get('createCardLogo','Web\WechatController@createCardLogo');  // 创建卡券logo
    });
});
Route::get('uploadCard','Web\WechatController@uploadCard');  // 创建卡券logo
Route::get('/wechat/customer', 'Web\WechatController@customer');    //微信公众号客服资料
